﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using PhoneBook.Models;

namespace PhoneBook.Controllers
{
    public class SessionController : Controller
    {
        public string Get(string name)
        {
            string val = HttpContext.Session.GetString("name");
            return val;
        }

        public string Set(string name,string value)
        {
            HttpContext.Session.SetString("name",value);
            string val = HttpContext.Session.GetString("name");
            return value;
        }

        
    }
}
